package com.canal.admin.transfer.req.channel;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author yangbo
 * @date 2020-06-23 15:15
 */
@Getter
@Setter
public class ChannelAddReq {

    @NotBlank(message = "渠道名不能为空")
    private String name;

    @NotBlank(message = "渠道账号不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]+$",message = "账号只能为字母或数字")
    private String buzName;

    @NotBlank(message = "渠道密码不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]+$",message = "密码只能为字母或数字")
    @Size(min = 6,max = 20,message = "密码为6-20位，请重新输入")
    private String buzPassword;
}
